<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><title>R: Biomass Tillage Data</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link rel="stylesheet" type="text/css" href="R.css" />
</head><body>

<table width="100%" summary="page for biomassTill"><tr><td>biomassTill</td><td style="text-align: right;">R Documentation</td></tr></table>

<h2>Biomass Tillage Data</h2>

<h3>Description</h3>

<p>An agricultural experiment in which different tillage methods were
implemented. The effects of tillage on plant (maize) biomass were
subsequently determined by modeling biomass accumulation for each
tillage treatment using a 3 parameter Weibull function.
</p>
<p>A datset where the total biomass is modeled conditional on a
three value factor, and hence <em>vector</em> parameters are used.
</p>


<h3>Usage</h3>

<pre>data("biomassTill", package="robustbase")</pre>


<h3>Format</h3>

<p>A data frame with 58 observations on the following 3 variables.
</p>

<dl>
<dt><code>Tillage</code></dt><dd><p>Tillage treatments, a <code>factor</code>
with levels </p>

<dl>
<dt><code>CA-</code>:</dt><dd><p>a no-tillage system with plant residues removed</p>
</dd>
<dt><code>CA+</code>:</dt><dd><p>a no-tillage system with plant residues retained</p>
</dd>
<dt><code>CT</code>:</dt><dd><p>a conventionally tilled system with residues incorporated</p>
</dd>
</dl>

</dd>
<dt><code>DVS</code></dt><dd><p>the development stage of the maize crop.  A DVS of
<code>1</code> represents maize anthesis (flowering), and a DVS of <code>2</code>
represents physiological maturity.   For the data, numeric vector with
5 different values between 0.5 and 2.</p>
</dd>
<dt><code>Biomass</code></dt><dd><p>accumulated biomass of maize plants from each
tillage treatment.</p>
</dd>
<dt><code>Biom.2</code></dt><dd><p>the same as <code>Biomass</code>, but with three
values replaced by &ldquo;gross errors&rdquo;.</p>
</dd>
</dl>



<h3>Source</h3>

<p>From Strahinja Stepanovic and John Laborde, Department of Agronomy &amp;
Horticulture, University of Nebraska-Lincoln, USA
</p>


<h3>Examples</h3>

<pre>
data(biomassTill)
str(biomassTill)
require(lattice)
## With long tailed errors
xyplot(Biomass ~ DVS | Tillage, data = biomassTill, type=c("p","smooth"))
## With additional 2 outliers:
xyplot(Biom.2 ~ DVS | Tillage, data = biomassTill, type=c("p","smooth"))

### Fit nonlinear Regression models: -----------------------------------

## simple starting values, needed:
m00st &lt;- list(Wm = rep(300,  3),
               a = rep( 1.5, 3),
               b = rep( 2.2, 3))

robm &lt;- nlrob(Biomass ~ Wm[Tillage] * (-expm1(-(DVS/a[Tillage])^b[Tillage])),
              data = biomassTill, start = m00st, maxit = 200)
##                                               -----------
summary(robm) ## ... 103 IRWLS iterations
plot(sort(robm$rweights), log = "y",
     main = "ordered robustness weights (log scale)")
mtext(getCall(robm))

## the classical (only works for the mild outliers):
cl.m &lt;- nls(Biomass ~ Wm[Tillage] * (-expm1(-(DVS/a[Tillage])^b[Tillage])),
            data = biomassTill, start = m00st)

## now for the extra-outlier data: -- fails with singular gradient !!
try(
rob2 &lt;- nlrob(Biom.2 ~ Wm[Tillage] * (-expm1(-(DVS/a[Tillage])^b[Tillage])),
              data = biomassTill, start = m00st)
)
## use better starting values:
m1st &lt;- setNames(as.list(as.data.frame(matrix(
                coef(robm), 3))),
                c("Wm", "a","b"))
try(# just breaks a bit later!
rob2 &lt;- nlrob(Biom.2 ~ Wm[Tillage] * (-expm1(-(DVS/a[Tillage])^b[Tillage])),
              data = biomassTill, start = m1st, maxit= 200, trace=TRUE)
)

## Comparison  {more to come} % once we have  "MM" working...
rbind(start = unlist(m00st),
      class = coef(cl.m),
      rob   = coef(robm))
</pre>


</body></html>
